<ion-view class="bg">
  <ion-header-bar class="bar bar-positive">
    <button class="button back-button buttons icon ion-ios-arrow-left button-clear" nav-direction="back" ui-sref="tab.workbench">返回</button>
    <h3 class="title">已签收</h3>
    <button class="button button-icon icon ion-ios-search" ng-click="modal.show()"></button>
  </ion-header-bar>
  <ion-content>
    <ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
    <div ng-if="showloading" class="ion-spinner">
      <ion-spinner icon="lines" class="spinner-calm"></ion-spinner>
    </div>
    <ion-list class="myList" ng-if="showloading == false">
      <h5 ng-if="signData==''" class="notFound">未找到数据</h5>
      <li class="item li" ng-click="goDetail(data.ID,data.WAYBILL_STATUS)" ng-repeat="data in signData">
        <div>
          <i>承运单号</i>
          <i class="value" style="color: #ff9800">{{data.WAYBILL_NO}}</i>
        </div>
        <img src="img/waybillState-6.png" class="stateImg">
        <div>
          <i>签收日期</i>
          <i class="value">{{data.SIGNATORY_DATE | date : "yyyy年MM月dd日"}}</i>
        </div>
        <div>
          <i>收货人</i>
          <i class="value">{{data.CONSIGNEE}}</i>
        </div>
        <div>
          <i>送货方式</i>
          <i class="value" ng-if="data.DELIVERY_TYPE==0">自提</i>
          <i class="value" ng-if="data.DELIVERY_TYPE==1">送货</i>
          <i class="value" ng-if="data.DELIVERY_TYPE==2">上楼</i>
        </div>
        <div>
          <i>货到收款</i>
          <i class="value">{{data.AGENCY_FUND | number:2}}元</i>
        </div>
        <div class="btnDiv" ng-if="data.RECEIPT_STATUS==0&&data.DESTINATION_ID!=null">
          <button class="button button-positive longButton" ui-sref="receiptRecovery({id:data.ID,RECEIPT_NUM:data.RECEIPT_NUM})" ng-click="$event.stopPropagation();">回单回收</button>
        </div>
      </li>
    </ion-list>
    <ion-infinite-scroll on-infinite="loadMore()" distance="1%" ng-if="hasNextPage()"></ion-infinite-scroll>
  </ion-content>
</ion-view>
